package com.demo.gateway.routes.filters;

import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.web.server.ServerWebExchange;

import lombok.extern.slf4j.Slf4j;
import reactor.core.publisher.Mono;

/**
 * @author: demo
 * @date: 2020年6月22日
 * @Document : 测试日志filter
 */
@Slf4j
public class LoggerGatewayFilter  implements GatewayFilter{

	@Override
	public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
		log.info("Logger Route URL==>{}",exchange.getRequest().getURI().getRawPath());
		return chain.filter(exchange);
	}

}
